package win.ganbo.easyframwork.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import win.ganbo.easyframwork.domain.User;
import win.ganbo.easyframwork.repository.UserRepository;
import win.ganbo.easyframwork.service.IUserService;

import javax.transaction.Transactional;
import java.util.List;

@Service
@Transactional
public class UserServiceImpl  implements IUserService{
	
	@Autowired
	UserRepository userRepository;


	@Override
	public User save(User user) {
		return userRepository.save(user);
	}

	@Override
	public List<User> findAll() {
		return userRepository.findAll();
	}

	@Override
	public List<User> findByHql(String hql, List<Object> params) {
		return userRepository.findByHql(hql,params);
	}
}
